<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <div id="app">
        <img src="http://api.blb.com/api/order-api/order/code?goodsId=999&price=1">
    </div>

    <script type="text/javascript" src="https://unpkg.com/vue"></script>
    <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
    <script>
        var interval;
        //定时查询订单状态
        interval = setInterval("checkOrder()",3000);
        function checkOrder(){
            axios.post("http://api.blb.com/api/order-api/order/checkOrder")
                .then(res => {
                    console.log(res.data);
                   if(res.data === "SUCCESS"){
                        location.href = "success.html";
                        clearInterval(interval);
                   }
                });
        }
    </script>
</body>
</html>